<php>if($Core['isWebAdmin']){</php>

<div class="wmenu">
	<php>
		$selectedCate = explode( ',',$_GET['class'] ) ;
	</php>
<volist id="vo" name="Core['category']">
	<php>$display = ($_COOKIE['menuSwitch'][$vo['a']]==1 && $selectedCate[0]!=$vo['a'])?'true':'false';</php>
	<div class="menu"><span <eq name='display' value="true">class="R_x"<else />class="R_s"</eq> onclick="hideswitch(this,'{$vo.a}')" ></span>{$vo.t}</div>
	<ul rel="{$vo.a}" <eq name='display' value="true">style="display:none"</eq> >
		<volist id="svo" name="vo['d']">
			<php>if($svo['t']){</php>
				<li><a title="{$svo.t}" <php>if( $selectedCate[1]==$svo['a'] ){</php>class="pitch_on"<php>}</php> href="{:U('bbs/Manage/'.ACTION_NAME,array('class'=>$vo['a'].','.$svo['a']))}">{$svo.t}</a></li>
			<php>}</php>
		</volist>
	</ul>
</volist>	
</div>

<script>
	function hideswitch(o,id){
		if( $(o).attr('class')=='R_s'){
			$(o).attr('class','R_x')
			$("ul[rel='"+ id +"']").slideUp('fast');
			document.cookie = 'menuSwitch['+id+']=1;path=/';
		}else{
			$(o).attr('class','R_s')
			$("ul[rel='"+ id +"']").slideDown('fast');
			document.cookie = 'menuSwitch['+id+']=0;path=/';
		}
	}
</script>

<php>}</php>